<template>
  <div class="news">
    <!--标题-->
    <div class="news1">
      <img @click="returns()" src="../../../assets/2.svg" />
      <h3>谁看过我</h3>
      <div></div>
    </div>
    <!--消息-->
    <div class="news2">
      <div class="news2-div" v-for="item in list" :key="item.id">
        <div class="photo"><img :src="item.tu" /></div>
        <div class="content">
          <router-link to="">
            <div class="content-div">
              <span>{{item.title}}</span>
              <div>
                <span class="content-span">{{item.title1}}</span>
                <span>{{item.title2}}</span>
              </div>
            </div>
            <div class="content-div1">{{item.title3}}</div>
          </router-link>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      list: [
        {
          id: 1,
          title: '小芳',
          title1: '2017.06.30',
          title2: '12:00',
          title3: '帅哥，给你发了好感，赶快回复吧。',
          tu: require('../../../assets/1.jpg')
        },
        {
          id: 2,
          title: '小芳',
          title1: '2017.06.30',
          title2: '12:00',
          title3: '帅哥，给你发了好感，赶快回复吧。',
          tu: require('../../../assets/2.jpg')
        }
      ]
    }
  },
  methods: {
    returns(){
      this.$router.back()
    }
  }
}
</script>
<style>
/*标题*/
.news{
  text-align: center;
}
.news1 {
  height: 55px;
  line-height: 55px;
  display: flex;
  justify-content: flex-start;
  border-bottom: 1px solid #ccc;
}
.news1 img {
  width: 20px;
  height: 20px;
  margin-top: 15px;
  margin-left: 15px;
}
.news1 h3 {
  font-weight: normal;
  flex: 6;
}
.news1 div {
  flex: 1;
}
/*消息*/
.news2-div {
  width: 100%;
  height: 90px;
  border-bottom: 1px solid #ccc;
  display: flex;
}
.photo {
  flex: 1;
}
.photo img {
  height: 70px;
  margin: 10px 0;
  border-radius: 20%;
  border: 1px solid red;
}
.content {
  height: 70px;
  margin: 10px 0;
  flex: 3;
  text-align: left;
}
.content a {
  text-decoration: none;
  color: #000;
}
.content-div {
  height: 35px;
  line-height: 35px;
  display: flex;
}
.content-div span {
  flex: 1;
}
.content-div div {
  flex: 1;
}
.content-span {
  margin-right: 15px;
}
.content-div1 {
  height: 35px;
  line-height: 35px;
}
</style>
